package threadStudy;

import java.util.concurrent.locks.LockSupport;

public class ParkAndUnPark {
    public static void main(String[] args) throws InterruptedException {
        ParkAndUnParkStudy t = new ParkAndUnParkStudy();
        t.start();
        LockSupport.unpark(t);
    }
}

class ParkAndUnParkStudy extends Thread {
    @Override
    public void run() {
        while (true) {
            System.out.println("66666");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            LockSupport.park();
        }
    }
}
